package BLL.AdminSys;




        import DAO.TotalFeeDAO;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@WebServlet(name = "daydegreeallincome", value = "/daydegreeallincome")
public class daydegreeallincome extends HttpServlet {
    private static final long serialVersionUID = 1L;

    public daydegreeallincome() {
        super();
    }

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        HttpSession session = request.getSession();



        TotalFeeDAO totalFeeDAO=new TotalFeeDAO();

        String allincome;
        String allrefund;
        String allmonthincome;
        String alldegreeincome;

        //传递四个数据给session
        allincome=(totalFeeDAO.getTotalFee()+"");
        session.setAttribute("allincome",allincome);

        allrefund=(totalFeeDAO.getRefund()+"");
        session.setAttribute("allrefund",allrefund);

        allmonthincome=(totalFeeDAO.getMonthIncome()+"");
        session.setAttribute("allmonthincome",allmonthincome);

        alldegreeincome=(totalFeeDAO.getTimesIncome()+"");
        session.setAttribute("alldegreeincome",alldegreeincome);


    }

    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request, response);
    }

}
